package com.ttg.web.dao.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ttg.common.dto.TagProducer;
import com.ttg.model.mapper.BankProductDataInfoMapper;
import com.ttg.model.pojo.BankProductDataInfo;
import com.ttg.web.dao.BankProductDataInfoDao;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangHongYuan
 * @description
 * @date 2024/4/16 16:52
 */
@Service
public class BankProductDataInfoDaoImpl extends ServiceImpl<BankProductDataInfoMapper, BankProductDataInfo> implements BankProductDataInfoDao {

    @Override
    public List<BankProductDataInfo> getByCstId(String cstId) {
        LambdaQueryWrapper<BankProductDataInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BankProductDataInfo::getCstId,cstId);
        return list(queryWrapper);
    }

    @Override
    public void truncate() {
       baseMapper.truncate();
    }

    @Override
    public List<Long> getVipIdsByTags(List<TagProducer> tags, String key) {
        return baseMapper.getVipIdsByTags(tags,key);
    }
}
